import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [


    {
      path: '/login',
      name: 'Login',
      component: () => import('@/views/login/index.vue')
    },

    {
      path: '/loanSuccess',
      name: 'LoanSuccess',
      component: () => import('@/views/loanSuccess/index.vue')
    },

    {
      path: '/xunnang',
      name: 'XunNang',
      component: () => import('@/views/xunnang/index.vue')
    },


    {
      path: '/defer',
      name: 'Defer',
      component: () => import('@/views/defer/index.vue')
    },


    {
      path: '/bankCardList',
      name: 'BankCardList',
      component: () => import('@/views/bankCardList/index.vue')
    },

     {
      path: '/addOrEditBankCard',
      name: 'AddOrEditBankCard',
      component: () => import('@/views/bankCardList/addOrEditBankCard.vue')
    },


    {
      path:'/payment',
      name:'Payment',
      component:()=>import('@/views/payment/index.vue')
    },
    {
      path:'/orderReserva',
      name:'OrderReserva',
      component:()=>import('@/views/mine/orderRserva.vue')
    },


    {
      path: '/',
      component: () => import('@/views/layout/index.vue'),
      redirect: '/login',
      children: [
        {
          path: '/home',
          name: 'Home',
          component: () => import('@/views/home/index.vue')
        },
   
        {
          path: '/confirmLoan',
          name: 'ConfirmLoan',
          component: () => import('@/views/home/confirmLoan.vue')
        },
  
        {
          path: '/refuseLoan',
          name: 'RefuseLoan',
          component: () => import('@/views/home/refuseLoan.vue')
        },
    
        {
          path: '/loanIng',
          name: 'LoanIng',
          component: () => import('@/views/loaning/index.vue')
        },
   
        {
          path: '/repayMent',
          name: 'RepayMent',
          component: () => import('@/views/home/repayment.vue')
        },

        {
          path: '/mine',
          name: 'Mine',
          component: () => import('@/views/mine/index.vue')
        },
      ]
    },

    // {
    //   path: '/',
    //   name: 'home',
    //   component: HomeView
    // },

    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue')
    // }



  ]
})

export default router
